import http from '@/utils/http2.js'

/**
 * 付款单列表
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function query(data){
  return http.post("/api/receipt/list",data)
}

/**
 * 导出付款单列表
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function exportExcel(data){
  return http.post("/api/receipt/export",{})
}

/**
 * 批量删除付款单
 * @param data
 * @returns {Promise<axios.AxiosResponse<*>>}
 */
export function batchDelete(data){
  return http.delete("/api/receipt/delete?ids="+data,{})
}

/**
 * 新增付款单
 * @param data
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function saveReceipt(data){
  return http.post("/api/receipt",data)
}

/**
 * 付款单详情
 * @param data
 * @returns {Promise<axios.AxiosResponse<*>>}
 */
export function receiptGet(data){
  return http.get("/api/receipt/get?id="+data,{})
}
export function updateReceipt(data){
  return http.put("/api/receipt",data)
}
